<template>
    <div>
        <table class="table">
            <thead>
                <tr>
                    <td>等级编号</td>
                    <td>等级名称</td>
                    <td>状态</td>
                    <td>创建时间</td>
                </tr>
            </thead>
            <tbody>
                 <tr v-for="a in datalist" :key="a.T_Dtyleid">
                    <td>{{a.T_Dtyleid}}</td>
                    <td>{{a.T_Dtylename}}</td>
                    <td>{{a.T_Dtylestate}}</td>
                    <td>{{a.T_Dtyletime.substr(0,10)}}</td>
                </tr>
            </tbody>
        </table>
    </div>
</template>

<script setup lang="ts">
import { ref,onMounted } from 'vue';
import axios from 'axios';
onMounted(()=>{

    getlist();
})
const datalist=ref([{
    "T_Dtyleid": 0,
    "T_Dtylename": "string",
    "T_Dtylestate": true,
    "T_Dtyletime": "2025-07-18T12:00:06.848Z"
  }])
const getlist=()=>{

    axios.get("https://localhost:44341/api/User/ShowDtyle").then((res)=>{

       datalist.value= res.data;
    });
};
</script>

<style scoped>

</style>